package apiday05.homework.day04;

import java.util.Arrays;
import java.util.List;

/**
 * 创建一个字符串数组:{"one","two","three"}
 * 然后将该数组转换为一个List集合
 *
 * @author Xiloer
 */
public class Test06 {
    public static void main(String[] args) {
//        创建一个字符串数组:{"one","two","three"}
        String[] array = new String[]{"one", "two", "three"};
        System.out.print("数组：");
        for (String s : array) {
            System.out.print(s + " ");
        }
//        将该数组转换为一个List集合
        List<String> list = Arrays.asList(array);
        System.out.println("\n集合：" + list);
    }
}
